<?php
    //配置数据库相关信息
    $config = array(
        "host" => "localhost",
        "username" => "root",
        "password" => "",
        "dbname" => "zyh"
    );
    //连接数据库  //里面有三个参数
    mysql_connect($config['host'],$config['username'],$config['password']);
    //选择连接的数据库
    mysql_select_db($config['dbname'])
?>